gh-156106: Add tests for setting and deleting attributes defined in C - #156107
Conversation
…d in C Test setting a value of an accepted type, of a wrong type and an invalid value, and deleting the attribute, for the attributes defined with PyMemberDef and PyGetSetDef which were not covered.
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
GH-156184 is a backport of this pull request to the 3.14 branch. |
|
GH-156191 is a backport of this pull request to the 3.13 branch. |
Tests for the attributes defined with
PyMemberDefandPyGetSetDefwhich were not covered: setting a value of an accepted type, of a wrong type or an invalid value, and deleting the attribute.They are added to the existing tests of the corresponding attributes where such tests exist.
Covered: the plain object members of exceptions,
function.__code__,__doc__and__kwdefaults__,frame.f_trace,f_trace_linesandf_trace_opcodes, the attributes of_ssl._SSLContextand_ssl._SSLSocket,sqlite3isolation_level,arraysizeandautocommit,ctypesraw,contents,argtypes,restypeanderrcheck, the CPicklerandUnpicklerattributes,_io_blksize,_finalizingand_CHUNK_SIZE, the private attributes ofdecimal.Context,defaultdict.default_factory,Future._cancel_messageand the members ofselect.kevent.